package 算法.链表;

import java.util.Arrays;

public class 二叉树遍历 {

    public static void main(String[] args) {
        int [] array = new int[]{6, 0, 9, 7, 5, 4, 3, 2, 1};
        TreeNode treeNode = new TreeNode();
        for (int temp : array) {
            treeNode.PutV(temp);
        }
        System.out.println("先序遍历："+ Arrays.toString(treeNode.PreOrder()));
        System.out.println("中序遍历："+ Arrays.toString(treeNode.MidOrder()));
        System.out.println("后序遍历："+ Arrays.toString(treeNode.PostOrder()));
    }

}
